Skip to content

BUG: iloc.__setitem__ with DataFrame value, multiple blocks, non-unique columns #36337

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 13, 2020

Conversation

jbrockmendel
Copy link
Member

  • closes #xxxx
  • tests added / passed
  • passes black pandas
  • passes git diff upstream/master -u -- "*.py" | flake8 --diff
  • whatsnew entry

@jbrockmendel jbrockmendel changed the title BUG: iloc.__setitem__ with DataFrame value, multiple blocks BUG: iloc.__setitem__ with DataFrame value, multiple blocks, non-unique columns Sep 13, 2020
@jreback
Copy link
Contributor

jreback commented Sep 13, 2020

does this directly close an issue?

@jreback jreback added this to the 1.2 milestone Sep 13, 2020
@jreback jreback added the Indexing Related to indexing on series/frames, not to indexes themselves label Sep 13, 2020
v = self._align_series(
tuple(sub_indexer), value[item], multiindex_indexer
)
else:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the end goal here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i dont understand the question. 1718-1728 is just an indented version of what we have in the status quo

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it looks like you separated out the cases and duplicated the code. So is this making it easier to understand, later refactoring, ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its similar but not identical. this chunk is aligning by label while the chunk above is aligning positionally.

yes, i do hope to refactor this method before too long

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok cool

yes, i do hope to refactor this method before too long

yeah these indexing routines defintely need some TLC

@jbrockmendel
Copy link
Member Author

does this directly close an issue?

No, stumbled on this bug yesterday

@jreback jreback merged commit b8448b2 into pandas-dev:master Sep 13, 2020
@jbrockmendel jbrockmendel deleted the bug-setitem-frame branch September 14, 2020 00:31
kesmit13 pushed a commit to kesmit13/pandas that referenced this pull request Nov 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Indexing Related to indexing on series/frames, not to indexes themselves
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants